<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true,outline:true" style="width:80px;height:30px" onclick="$('#dlg2').dialog('open').dialog('center')">Rooms</a>
			<input id="displayBox" type="text"/>
		
			<div id="dlg2" class="easyui-dialog" style="padding:20px 6px;width:80%;" data-options="inline:true,modal:true,closed:true,title:'Personal Info'">
				<ul id="group" class="m-list"></ul>
				<input id="roomName" class="easyui-textbox"  style="width:100%" data-options="buttonText: 'add',onClickButton:createGroup">
				<div class="dialog-button">
					<a id="dgbt" href="javascript:void(0)" class="easyui-linkbutton" style="width:100%;height:35px" onclick="$('#dlg2').dialog('close')">close</a>
				</div>
			</div>
			<script type="text/javascript">
				$(function(){
					initframe();//onclick="javascript:"
					
				})
				function initframe(){
					$('#displayBox').textbox({
						width:'412',
						height:'444',
						multiline:true,
						editable:false
					});
					addRoom();
				}
				function createGroup(){
					/* 获取消息内容 */
					var text = $('#roomName').textbox('getText');
					$('#roomName').textbox('clear');
					/* 判断 */
					if(text == null || text == ""){
					    alert(" content  can not empty!!");
					    return false;
					}
					
					createRoom(text);
					$("#inputBox").textbox('enable');
					$('#dgbt').click();
				}
				function addRoom(){
					//for(int i=0; i<roomlist.len; i++){
						$("#group").append(roomlist);
						roomlist.length = 0;

				}
			</script>
	</body>
</html>
